package com.ruoyi.system.service.zhaungxiuservice.shopService.impl;

import com.ruoyi.system.domain.construction.Account;
import com.ruoyi.system.mapper.zhuangxiumapper.shopMapper.AccountMapper;
import com.ruoyi.system.service.zhaungxiuservice.shopService.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 保证金Service业务层处理
 *
 * @author ruoyi
 * @date 2021-04-21
 */
@Service
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private AccountMapper accountMapper;

    /**
     * 查询保证金
     *
     * @param accountId 保证金ID
     * @return 保证金
     */
    @Override
    public Account selectAccountById(Integer accountId)
    {
        return accountMapper.selectAccountById(accountId);
    }

    /**
     * 查询保证金列表
     *
     * @param account 保证金
     * @return 保证金
     */
    @Override
    public List<Account> selectAccountList(Account account)
    {
        return accountMapper.selectAccountList(account);
    }

    /**
     * 新增保证金
     *
     * @param account 保证金
     * @return 结果
     */
    @Override
    public int insertAccount(Account account)
    {
//        System.err.println("*****account.getSupplierIdNum().toString()**********"+account.getSupplierIdNum());
        return accountMapper.insertAccount(account);
    }

    /**
     * 修改保证金
     *
     * @param account 保证金
     * @return 结果
     */
    @Override
    public int updateAccount(Account account)
    {
        return accountMapper.updateAccount(account);
    }

    /**
     * 批量删除保证金
     *
     * @param accountIds 需要删除的保证金ID
     * @return 结果
     */
    @Override
    public int deleteAccountByIds(Integer[] accountIds)
    {
        return accountMapper.deleteAccountByIds(accountIds);
    }

    /**
     * 删除保证金信息
     *
     * @param accountId 保证金ID
     * @return 结果
     */
    @Override
    public int deleteAccountById(Integer accountId)
    {
        return accountMapper.deleteAccountById(accountId);
    }
}
